import request from 'service/request';

export function getProducts(params){
	return request({
	    url: '/product/getListAll',
	    method: 'get',
	    params
	});
}
export function getScore(){
	return request({
	    url: '/credit/getAvailableCredit',
	    method: 'get'
	});
}
export function getVisibleCredit(){
	return request({
	    url: '/credit/getVisibleCredit',
	    method: 'get'
	});
}
export function createOrder(option){
	return request({
	    url: '/order/place',
	    method: 'POST',
	    data:option
	});
}
export function cancelOrder(option){
	return request({
	    url: '/order/cancelOrder',
	    method: 'POST',
	    data:option
	});
}
export function getOrderList(option){
	return request({
	    url: '/order/myOrderList',
	    method: 'get',
	    params:{
	    	pageNum:1 || option.pageNum,
	    	pageSize:50 || option.pageSize,
	    	type:option.type
	    }
	});
}



export function getInsiderAvailableQuota(){
	return request({
	    url: '/order/getInsiderAvailableQuota',
	    method: 'get'
	});
}



export function setDoctorInfo(data) {
    return request({
        url: '/user/hz/updateInfo',
        method: 'POST',
        data
    });
}

export function checkOrder() {
    return request({
        url: '/order/hz/check',
        method: 'get',
    });
}
